<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		
		<script type="text/javascript">
			let body = document.getElementsByTagName('body')[0];
			
			//onkeypress 是鼠标按下并松开 的事件监听属性
			body.onkeypress = function(event){ // event 是事件对象
				alert('您按的是'+ event.key );
			}
			
		</script>
	</body>
</html>
